package com.jd.jobkeeper.server.data.pesistence;

import com.jd.jobkeeper.server.data.entity.TaskInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface TaskInfoRepository extends JpaRepository<TaskInfo, Long> {

    List<TaskInfo> findByJobIdAndStatusContains(Long jobId, Integer... status);

    TaskInfo findTopByJobIdOrderByTriggerTimeDesc(Long jobId);



}
